<?php
defined('BASEPATH') OR exit('No direct script access allowed');


class Article extends CI_Controller
{

	public function __construct()
	{
		parent::__construct();
		$this->load->model('Category_Model');
		$this->load->helper('url_helper');
	}
	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 *        http://example.com/index.php/welcome
	 *    - or -
	 *        http://example.com/index.php/welcome/index
	 *    - or -
	 * Since this controller is set as the default controller in
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see https://codeigniter.com/user_guide/general/urls.html
	 */
	public function show($page)
	{
		$data=array('title'=>'法院介绍');
		$this->load->view('head_sec',$data);
		$this->load->view($page);
		$this->load->view('foot_sec',$data);
	}

	public function arclist($category=1)
	{
		if(isset($_POST['isAjax'])){

		}else{
			$data['category']=$category;
			$data['start_row']=0;
			$data['number']=10;
			$data['sort']='gmt_modify desc';

			$articles=array('title'=>'诉讼常识');
			$articles['article_title_array']=$this->Article_Model->get_article_list($data);
			$this->load->view('head_sec',$articles);
			$this->load->view('article_list',$articles);
			$this->load->view('foot_sec',$articles);
		}
	}

	public function detail($id){
		$title='举证须知';
		$content='<h1 style="text-align: center">举证须知</h1><p>
		举证须知,举证须知,举证须知,举证须知,举证须知,
		举证须知,举证须知,举证须知,举证须知,举证须知,
</p><p>
		举证须知,举证须知,举证须知,举证须知,举证须知,
		举证须知,举证须知,举证须知,举证须知,举证须知,
</p>
<p>
		举证须知,举证须知,举证须知,举证须知,举证须知,
		举证须知,举证须知,举证须知,举证须知,举证须知,
</p>';
		$data=array('title'=>$title,
			'content'=>$content
		);
		$this->load->view('head_sec',$data);
		$this->load->view('article_detail',$data);
		$this->load->view('foot_sec',$data);
	}
}


